package com.galaxy.payment.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 资金流水记录对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("account_flow")
public class AccountFlow extends BaseEntity {

    /**
     * 主键
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 关联订单号
     */
    private String orderNo;

    /**
     * 流水类型(1:充值,2:消费,3:退款,4:积分兑换)
     */
    private Integer flowType;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 变动后余额
     */
    private BigDecimal balance;

    /**
     * 描述
     */
    private String description;
}
